Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

250
Views
"Property 'object3D' does not exist on type 'Element'" error when trying to access Element.object3D in A-frame with TypeScript

First, I'm Japanese student. So, please forgive my poor English. I'm developing a-frame library that make animation with anime.js in TypeScript now. When I tried to accessing Element.object3D to update value of position, TypeScript generated "Property 'object3D' does not exist on type 'Element'" error. Here is my code.

function updateValue(target: Element, attr: Attribute, value: number) {
switch (attr) {
    case "PositionX":
        target.object3D.position.setX(value)
    case "PositionY":
        target.object3D.position.setY(value)
    case "PositionZ":
        target.object3D.position.setZ(value)

}

I realize 'object3D' does not exist on Element but when import a-frame it exists. I tried to require("aframe") but this problem was not fixed. I apologize for the rudimentary nature of this question and my poor English, but I would be very grateful if you could answer it.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You probably need to install @types/aframe package, to have the typings for your typescript project.

After that, use Entity or Scene (I don't know which one is the one that you receive in updateValue but those 2 contain object3D.

function updateValue(target: Entity, attr: Attribute, value: number) {
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!